From: Mary Boetcher, mary_boetcher@quickmail.apple.com
Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
Mail*LinkĀ® SMTP Re>>Paste Exception
>>So I don't know if I should post an error dialog when I encounter the error
>>and throw some standard exception to have the command aborted, or if I
>>should really define my own exception class and make sure I catch it
>>myself. In the latter case, where do I catch it and what do I do
>>thereafter.
ODF code contains a couple of examples of putting up an alert after catching an exception. See the FW_CPrintHandler methods HandlePageSetup and HandlePrint.
In the case of a Paste command, any exceptions that occur will be caught in FW_CCommand::Execute. To catch the exception yourself, you could override FW_CClipboardCommand::Paste and add your own Try block, like this: